<style lang="less" scoped>
.complist {
    position: relative;
    height: 100%;
    box-sizing: border-box;
    // padding-bottom: 66px;
}

.title {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    padding: 0.15rem;
    display: flex;
    font-size: 0.12rem;
    align-items: center;
    background-color: #fff;
    box-sizing: border-box;
    z-index: 10;
    .count {
        position: relative;
        color: #333333;
        padding-left: 10px;
        flex: 1;
        span {
            color: #ff3a2f;
        }
        &::after {
            content: "";
            display: block;
            background-color: #1b88ee;
            width: 5px;
            height: 5px;
            position: absolute;
            left: 0;
            top: 50%;
            margin-top: -3px;
        }
    }
    .long,
    .new {
        background-color: #eeeeee;
        color: #999999;
        padding: 6px 20px;
        margin-left: 0.1rem;
        border-radius: 4px;
    }
    .active {
        background-color: #d3e9fe;
        color: #1b88ee;
    }
}

.list {
    padding-top: 60px;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
    ul {
        overflow-x: hidden;
    }
    li {
        position: relative;
        display: flex;
        font-size: 0.12rem;
        padding: 10px 0;
        height: 50px;
        > div {
            height: 100%;
        }
        &::after {
            content: "";
            display: block;
            position: absolute;
            width: 100%;
            left: 50px;
            bottom: 0;
            height: 1px;
            background-color: #dddddd;
            transform: scaleY(0.5);
        }
    }
    .col1 {
        width: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        .check {
            position: relative;
            width: 17px;
            height: 17px;
            border: 1px solid #e0e0e0;
            border-radius: 50%;
            overflow: hidden;
            box-sizing: border-box;
            img {
                display: none;
                width: 18px;
                height: 18px;
                position: relative;
                top: -1px;
                left: -1px;
            }
        }
    }
    .sel {
        .check {
            overflow: visible;
            border: 0;
            img {
                display: block;
            }
        }
    }
    .col2 {
        flex: 1;
        .name {
            color: #333333;
            font-size: 0.15rem;
            font-weight: 600;
        }
        .time {
            color: #999999;
            margin-top: 5px;
        }
    }
    .col3 {
        // flex: 1;
        text-align: right;
        color: #333333;
    }
    .col4 {
        width: 30px;
        .more {
            width: 20px;
            height: 20px;
        }
    }
}
</style>
<template>
    <div class="component complist">
        <div class="title">
            <div class="count">
                待审核
                <span>{{ pageData.maxNum }}</span>条
            </div>
            <div class="long active">最久</div>
            <div class="new">最新</div>
        </div>
        <div class="list">
            <mugenScroll @onBottom="onBottom" :status="status">
                <ul>
                    <li v-for="(row, idx) in list" :key="idx" @click="goDetail(row)">
                        <div class="col1" @click.stop="selRow(idx)" :class="{'sel': row._sel}">
                            <div class="check">
                                <img src="@/assets/icon/icon_sel.png" />
                            </div>
                        </div>
                        <div class="col2">
                            <div class="name">{{ row.shop_name }}</div>
                            <div class="time">{{ row.create_time }}</div>
                        </div>
                        <div class="col3"></div>
                        <div class="col4">
                            <div class="more more7"></div>
                        </div>
                    </li>
                </ul>
            </mugenScroll>
        </div>
    </div>
</template>
<script>
import mugenScroll from "@/components/mugenScroll";
export default {
    data() {
        return {
        };
    },
    props: {
        status: {
            type: Number,
            default: 1
        },
        list: {
            type: Array,
            default: function() {
                return [];
            }
        },
        pageData: {
            type: Object,
            default: function() {
                return {};
            }
        }
    },
    components: {
        mugenScroll
    },
    methods: {

        onBottom(){
            this.$emit("onBottom");
        },
        
        selRow(idx) {
            this.$emit("onSel", idx);
        },
        goDetail(row) {
            this.$router.push({
                path: "/workbench/auditshopdetail",
                query: {
                    id: row.id,
                }
            });
        }
    },
    mounted() {}
};
</script>
